package com.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.mapper.HydropowerMapper;
import com.pojo.Hydropower;
import com.service.TempPayService;
import com.vo.HydropowerGasVo;
import com.vo.HydropowerVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("tempPayService")
public class TempPayServiceImpl implements TempPayService {
    @Resource
    private HydropowerMapper hydropowerMapper;
    @Override
    public PageInfo<Hydropower> selectAllWaterRecording(Hydropower hydropower) {
        PageHelper.startPage(hydropower.getPage(),hydropower.getLimit());
        List<Hydropower> hydropowers = hydropowerMapper.selectAllWaterRecording(hydropower);
        PageInfo<Hydropower> pageInfo=new PageInfo<>(hydropowers);
        return pageInfo;
    }

    @Override
    public PageInfo<Hydropower> selectAllEleRecording(HydropowerVo hydropowerVo) {
        PageHelper.startPage(hydropowerVo.getPage(),hydropowerVo.getLimit());
        List<Hydropower> hydropowers = hydropowerMapper.selectAllEleRecording(hydropowerVo);
        PageInfo<Hydropower> pageInfo=new PageInfo<>(hydropowers);
        return pageInfo;
    }

}
